import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/login'
import ColTask from '@/views/coltask'
import CrTask from '@/views/crtask'
import SetTask from '@/views/settask'
import SList from '@/views/slist'
import DList from '@/views/dlist'
import SubTask from '@/views/subtask'
import LokTask from '@/views/loktask'
import CrSub from '@/views/crsub'
import CrTag from '@/views/crtag'
import ColSub from '@/views/colsub'
import TaskStatus from '@/views/task_status'
import AdminTaskInfo from '@/views/adminTaskInfo'
import AdminTaskSlist from '@/views/adminTaskSlist'
import AdminTaskDlist from '@/views/adminTaskDlist'
import Layout from '../views/layout/AdminLayout'
Vue.use(Router)

export default new Router({
  routes: [
    {path: '/', redirect: '/login'},
    {
      path: '/admin',
      component: Layout,
      redirect: '/admin/collector',
      name: 'admin',
      children: [{
        path: 'collector',
        name: 'collector',
        component: () => import('@/views/admin/collector/index')
      },
      {
        path: 'submitter',
        name: 'submitter',
        component: () => import('@/views/admin/submitter/index'),  
      },
      {
        path: 'task',
        name: 'task',
        component: () => import('@/views/admin/task/index'),  
      },
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/subtask',
      name: 'subtask',
      component: SubTask
    },
    {
      path: '/crtask',
      name: 'crtask',
      component: CrTask
    },
    {
      path: '/settask',
      name: 'settask',
      component: SetTask
    },
    {
      path: '/slist',
      name: 'slist',
      component: SList
    },
    {
      path: '/dlist',
      name: 'dlist',
      component: DList
    },
    {
      path: '/coltask',
      name: 'coltask',
      component: ColTask
    },
    {
      path: '/loktask',
      name: 'loktask',
      component: LokTask
    },
    {
      path: '/crsub',
      name: 'crsub',
      component: CrSub
    },
    
    {
      path: '/crtag',
      name: 'crtag',
      component: CrTag
    },
    {
      path: '/colsub',
      name: 'colsub',
      component: ColSub
    },
    {
      path: '/task_status',
      name: 'task_status',
      component: TaskStatus
    },
    
    
    {
      path: '/adminTaskInfo',
      name: 'adminTaskInfo',
      component: AdminTaskInfo
    },
    {
      path: '/adminTaskSlist',
      name: 'adminTaskSlist',
      component: AdminTaskSlist
    },
    {
      path: '/adminTaskDlist',
      name: 'adminTaskDlist',
      component: AdminTaskDlist
    },
    
  ]
})


